package com.newcapec.lesson4;

public class Demo3 {
    public static void main(String[] args) {
        StringBuilder stringBuilder = new StringBuilder("123");
        stringBuilder.append("234");
        String str = "123";
        str += "234";
        StringBuffer stringBuffer = new StringBuffer("123");
        stringBuffer.append("123");

        String str1 = "hello";
        System.out.println(str1);
        changeValue(str1);
        System.out.println(str1);

        Person person1 = new Person();
        person1.name = "张三";
        System.out.println(person1.name);
        changeValue(person1);
        System.out.println(person1.name);

        String str111 = "hello";
        String str222 = str111;

    }


    public static void changeValue(String value){
        value = "world!!!";
    }

    public static void changeValue(Person person){
        person.name = "李四";
    }
}
